/**
 *@ClassName WhenDemo
 *
 *@Author ykx
 *@Date  2024/6/17 15:32
 *@Version 1.0
 */
fun main(args: Array<String>) {
    gradeStudent(3)
}

fun gradeStudent(score: Int) {
    when (score) {
        10 -> println("考了满分，棒棒哒")
        9 -> println("干得不错")
        8 -> println("还可以")
        7 -> println("还需努力")
        6 -> println("刚好及格")
        else -> println("不及格")
    }
}